import cookies from './util.cookies';
import db from './util.db';
import log from './util.log';
import data from './util.data';

const util = {
  cookies,
  db,
  log,
  data,
};

/**
 * @description 更新标题
 * @param {String} titleText 标题
 */
util.title = function(titleText) {
  const processTitle = process.env.VUE_APP_TITLE || 'D2Admin';
  window.document.title = `${processTitle}${
    titleText ? ` | ${titleText}` : ''
  }`;
};

export default util;
